feat: add compat.websocket 12.0.1 (IXWebSocket RFC 6455 client, zero deps) - #158
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
compat.websocket12.0.1 — IXWebSocket, a pure C++ RFC 6455 WebSocket client, as a header-compat (Form B) package with zero external dependencies.pkgs/c/compat.websocket.lua—language="c++23",import_std=false; the 32 client TUs transcribe upstream CMake'sIXWEBSOCKET_SOURCESminus the four server TUs (IXWebSocketServer/IXSocketServer/IXHttpServer/IXWebSocketProxyServer); none of the retained TUs reference any of them, so the link is clean.IXWEBSOCKET_USE_TLS; OpenSSL/MbedTLS/AppleSSL TUs not built), zlib off (IXWEBSOCKET_USE_ZLIBunset; gzip codec compiles to a no-op). Nofeaturesare offered yet — the server side and wss are deliberately out of scope for the first version.mcpp-reswrite access here), perdocs/cn-mirror.mdfallback. A maintainer can flip to{ GLOBAL, CN }— shad23bdc91…is stable.tests/examples/websocket): fully offline and self-contained — it runs its own minimal RFC 6455 echo server on loopback raw sockets (own SHA-1 + base64 forSec-WebSocket-Accept, own frame codec) and drivesix::WebSocketagainst it, asserting the handshake, client masking, text/binary echo, ping/pong both directions, fragmentation reassembly, and the close handshake.Verification
Ran with the CI-pinned mcpp
2026.8.3.3,gcc@16.1.0,MCPP_INDEX_MIRROR=GLOBAL,MCPP_BUILD_CACHE=local, coldtarget//.mcpp/:11 assertions all green (
ALL WEBSOCKET ASSERTIONS PASSED), including the handshake accept validation, the masked-bit check, and a fragmented-message reassembly. All lint scripts pass (syntax, required fields, no leading-v,check_mirror_urls,check_package_name, cross-package refs).See
.agents/docs/2026-08-06-add-websocket-plan.mdfor the full shape decision, platform flags, and the two test pitfalls found and fixed (IXWebSocket's automatic-reconnection default, and the early masked-bit assertion).Follow-ups (not in this PR)
mcpp-res/websocketonce write access is available.wss/TLS feature viacompat.openssl/compat.mbedtls.websocket.hpp) over the client.